Cope with a response that's not a dictionary.
authorEwan Mellor <ewan@xensource.com>
Fri, 22 Dec 2006 11:34:13 +0000 (11:34 +0000)
committerEwan Mellor <ewan@xensource.com>
Fri, 22 Dec 2006 11:34:13 +0000 (11:34 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xm/XenAPI.py

index 5cf929f48cbc6c7d9eff922c6a47ac51897a3df2..cd794087c31f9ba5e6ebb7540c32c1953619b294 100644 (file)
@@ -106,7 +106,7 @@ class Session(xen.util.xmlrpclib2.ServerProxy):
 
 
 def _parse_result(result):
-    if 'Status' not in result:
+    if type(result) != dict or 'Status' not in result:
         raise xmlrpclib.Fault(500, 'Missing Status in response from server')
     if result['Status'] == 'Success':
         if 'Value' in result: